#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int iint(const void* a, const void* b)
{
	int*c=(int*)a;
	int*d=(int*)b;
	return *c - *d;
}
int ffloat(const void* c, const void* d)
{
	float*a=(float*)c;
	float*b=(float*)d;
	if (*a - *b > 0)
		return 1;
	if (*a - *b < 0)
		return -1;
	if (*a - *b == 0)
		return 0;
}
int cchar(const void* a, const void* b)
{
	char*c=(char*)a;
	char*d=(char*)b;
	return (int)(*c - *d);
}
void printqs(int*a,float*b,char*c)
{
	int i = 0;
	for (i = 0; i < 10; i++)
		printf("%d ", *(a+i));
	printf("\n");
	for (i = 0; i < 10; i++)
		printf("%f ", *(b+i));
	printf("\n");
	for (i = 0; i < 10; i++)
		printf("%c ", *(c+i));
	printf("\n");
}
int mainqs()
{
	int (*sort[4])(void*, void*) = { iint,ffloat,cchar };
	int ii[10] = {1,5,3,2,7,9,7,3,4,0};
	float ff[10] = {3.0,10.245,12.4,103.22,12.2,3.14,22.22,1223.2,45.2,11};
	char cc[10] = {"dhtenkSYad"};
	qsort(ii, 10, sizeof(int), iint);
	qsort(ff, 10, sizeof(float), ffloat);
	qsort(cc, 10, sizeof(char), cchar);
	printqs(ii, ff, cc);
	printf("\n");
	return 0;
}